#include"List.h"
using namespace zwy;

void Test_List1()
{
	List <int>l1;
	l1.push_back(1);
	l1.push_back(2);
	l1.push_back(3);
	l1.push_back(4);
	l1.push_back(5);
	auto it = l1.begin();
	while (it != l1.end())
	{
		cout << *it << " ";
		++it;
	}
	cout << endl;

	l1.insert(it, 7);
	l1.insert(++it, 6);
	 it = l1.begin();
	while (it != l1.end())
	{
		cout << *it << " ";
		++it;
	}
	cout << endl;
}
void Test_List2()
{
	List <int>l1;
	l1.push_front(1);
	l1.push_front(2);
	l1.push_front(3);
	l1.push_front(4);
	l1.push_front(5);
	l1.print();
	l1.pop_back();
	l1.print();
	l1.pop_front();
	l1.print();
}
void Test_List3()
{
	List <int>l1;
	l1.push_front(1);
	l1.push_front(2);
	l1.push_front(3);
	l1.push_front(4);
	l1.push_front(5);
	l1.print();
	List<int> l2(l1);
	List <int>l3;
	l3 = l2;
	l2.print();
	l3.print();
	l3.clear();
	l3.print();
	l3.push_back(111);
	l3.push_back(222);
	l3.push_back(333);
	l3.push_back(444);
	l3.print();

}

int main()
{
	Test_List3();
	return 0;
}